
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.IOException;


public class KundenPanel extends NaviPanel {

	private MainWindow main;
	/**
	 * Create the panel.
	 */
	public KundenPanel(MainWindow window) {
		super(window);
		
		main = window;
		
		BufferedImage wp = null;
		try {
			wp = ImageIO.read(this.getClass().getResource("/home_kunde.png"));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		JLabel wIcon = new JLabel(new ImageIcon(wp));
		wIcon.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.addKundenPanel();
			}
		});
		add(wIcon, "cell 0 1");
		
		JLabel lblWarenkorb = new JLabel("Warenkorb:");
		add(lblWarenkorb, "cell 0 2");
		
		BufferedImage wp1 = null;
		try {
			wp1 = ImageIO.read(this.getClass().getResource("/btn_cart.png"));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		JLabel lblAnzeigen = new JLabel(new ImageIcon(wp1));
		lblAnzeigen.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.gibWarenkorbAus();
			}
		});
		add(lblAnzeigen, "cell 0 2");
		
		JLabel lblLeeren = new JLabel("leeren");
		lblLeeren.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.warenkorbLeeren();
			}
		});
		add(lblLeeren, "cell 0 2");
		
		JLabel lblBereitsGekaufteArtikel = new JLabel("bereits gekaufte Artikel");
		lblBereitsGekaufteArtikel.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.gibGekaufteArtikel();
			}
		});
		add(lblBereitsGekaufteArtikel, "cell 0 3");

		JLabel lblProfilEditieren = new JLabel("Profil editieren");
		lblProfilEditieren.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.kundenprofilEditieren();
			}
		});
		add(lblProfilEditieren, "cell 0 4");
		
		JLabel lblKontakt = new JLabel("Kontakt");
		lblKontakt.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.kontakt();
			}
		});
		add(lblKontakt, "cell 0 5");
		
		JLabel lblSessionSichern = new JLabel("Session sichern");
		lblSessionSichern.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				
			}
		});
		add(lblSessionSichern, "cell 0 6");
	}

}
